package com.ucampus.service;

import com.ucampus.dao.oS_viewsMapper;
import com.ucampus.entity.oS_views;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 功能：
 * 作者： 启明星_Polaris
 * 日期：2025/1/7 上午10:37
 **/

@Service
public class oS_viewsServiceImpl implements oS_viewsService{

    @Autowired
    private oS_viewsMapper viewsMapper;

    @Override
    public List<oS_views> getAllViews(int page, int size) {
        int offset = (page - 1) * size;
        return viewsMapper.selectContent(size ,offset);
    }

    @Override
    public oS_views getInfoById(int id) {
        return viewsMapper.getViewsById(id);
    }
}
